/* 设置页面样式 */
.settings-container .fav-toolbar { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 20px 35px 12px 35px;
  flex-wrap: nowrap;
  min-height: 60px;
}

.settings-container .fav-toolbar-left {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-shrink: 0;
}

.settings-container .fav-toolbar-left h2 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.settings-container .sidebar-toggle {
  background: transparent;
  border: none;
  color: #ccc;
  font-size: 1.2em;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.settings-container .sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.settings-container .fav-actions { 
  display: flex; 
  gap: 8px; 
  align-items: center;
  flex-shrink: 0;
}

.settings-container .settings-view {
  padding: 10px 35px;
  overflow-y: scroll;
  height: 100%;
}

.settings-page {
  padding: 20px;
  color: #fff;
}

/* 设置页面滚动条样式 */
.settings-page::-webkit-scrollbar {
  width: 8px;
}

.settings-page::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
}

.settings-page::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  transition: background 0.3s ease;
}

.settings-page::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* 统计信息区域 */
.stats-section {
  margin-bottom: 30px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  font-size: 32px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(78, 205, 196, 0.2);
  border-radius: 12px;
  flex-shrink: 0;
}

.stat-content {
  flex: 1;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1;
}

.stat-label {
  font-size: 14px;
  color: #ccc;
  font-weight: 500;
}

/* 设置区域 */
.settings-section {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.settings-section h3 {
  font-size: 1.3em;
  margin-bottom: 20px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
}

.settings-section-header {
  margin-bottom: 24px;
}

.settings-section-header h3 {
  margin: 0 0 8px 0;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  border-bottom: none;
  padding-bottom: 0;
}

.settings-section-desc {
  margin: 0;
  color: #ccc;
  font-size: 14px;
  line-height: 1.5;
}

/* 刮削功能配置样式 */
.scraping-config {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.config-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.config-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.config-info {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.config-icon {
  font-size: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(78, 205, 196, 0.2);
  border-radius: 10px;
  flex-shrink: 0;
}

.config-details {
  flex: 1;
}

.config-title {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
}

.config-desc {
  font-size: 13px;
  color: #ccc;
  line-height: 1.4;
}

.config-control {
  flex-shrink: 0;
}

/* 刮削操作区域 */
.scraping-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.scraping-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.scraping-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.scraping-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
}

.scraping-tip {
  font-size: 12px;
  color: #aaa;
  text-align: center;
  line-height: 1.4;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

/* 数据同步操作区域 */
.sync-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.sync-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sync-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #5fd8cf 0%, #55b19e 100%);
}

.sync-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
}

.sync-tip {
  font-size: 12px;
  color: #aaa;
  text-align: center;
  line-height: 1.4;
  padding: 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

/* 开关按钮样式 */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: 0.4s;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: 0.4s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  border-color: rgba(78, 205, 196, 0.5);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.switch:hover .slider {
  box-shadow: 0 0 8px rgba(78, 205, 196, 0.3);
}

/* 媒体库管理样式 */
.add-library {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.add-library-input {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.add-library input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  transition: all 0.2s ease;
}

.add-library input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.add-library input:focus {
  outline: none;
  border-color: #4ecdc4;
  background: rgba(255, 255, 255, 0.15);
}

/* 设置页面专用的add-btn样式 */
.settings-container .add-library .add-btn {
  padding: 12px 20px;
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  border: none;
  border-radius: 8px;
  color: white;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
  width: auto;
  height: auto;
  border-radius: 8px;
  font-size: 14px;
}

.settings-container .add-library .add-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.settings-container .add-library .add-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.libraries-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.library-item {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.library-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(5px);
}

.library-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.library-icon {
  font-size: 24px;
  color: #4ecdc4;
}

.library-details {
  flex: 1;
}

.library-path {
  font-weight: 600;
  color: #fff;
  margin-bottom: 5px;
  font-size: 14px;
}

.library-status {
  font-size: 12px;
}

.status {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.status.ready {
  background: rgba(78, 205, 196, 0.2);
  color: #4ecdc4;
}

.status.scanning {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.library-actions {
  display: flex;
  gap: 10px;
}

.scan-btn, .delete-btn {
  padding: 8px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.scan-btn {
  background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
  color: white;
}

.scan-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.scan-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.delete-btn {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: white;
}

.delete-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.empty-state {
  text-align: center;
  color: #888;
  padding: 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h4 {
  margin: 0 0 8px 0;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.empty-state p {
  font-size: 14px;
  opacity: 0.7;
  margin: 0;
  line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .settings-container .settings-view {
    padding: 16px;
  }
  
  .settings-container .fav-toolbar {
    padding: 15px 20px 10px 20px;
    gap: 10px;
  }
  
  .settings-container .fav-toolbar-left h2 {
    max-width: 150px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-icon {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
  
  .stat-value {
    font-size: 24px;
  }
  
  .config-item {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .config-control {
    align-self: flex-end;
  }
  
  .scraping-actions {
    padding: 12px;
  }
  
  .scraping-btn {
    padding: 10px 20px;
    font-size: 13px;
  }
  
  .sync-actions {
    padding: 12px;
  }
  
  .sync-btn {
    padding: 10px 20px;
    font-size: 13px;
  }
  
  .add-library-input {
    flex-direction: column;
    align-items: stretch;
  }
  
  .library-item {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .library-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .settings-container .fav-toolbar {
    padding: 12px 15px 8px 15px;
  }
  
  .settings-container .fav-toolbar-left h2 {
    display: none;
  }
  
  .switch {
    width: 50px;
    height: 28px;
  }
  
  .slider:before {
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
  }
  
  input:checked + .slider:before {
    transform: translateX(22px);
  }
  
  .scraping-btn {
    padding: 8px 16px;
    font-size: 12px;
  }
  
  .scraping-tip {
    font-size: 11px;
    padding: 6px;
  }
}
